package com.huabo.monitor.mapper;

import com.huabo.monitor.entity.TblTesttemplType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yhr
 * @since 2022-09-13
 */
public interface TblTesttemplTypeMapper extends BaseMapper<TblTesttemplType> {


    @Select("${sql}")
    List<TblTesttemplType> getListBySql(@Param("sql") String sql);

    @Select("select * from  TBL_TESTTEMPL_TYPE t where t.parentid=#{id}")
    List<TblTesttemplType> getchild(BigDecimal id);




    @Select(" select count(*) from TBL_TESTTEMPL_TYPE t where t.parentid  =#{id}")
    Long getChildCount(BigDecimal id);
}
